 <?php
	$lastNo=$this->getGameLastNo($this->type);
	$kjHao=$this->getValue("select data from {$this->prename}data where type={$this->type} and number='{$lastNo['actionNo']}'");
	if($kjHao) $kjHao=explode(',', $kjHao);
	$actionNo=$this->getGameNo($this->type);
	$types=$this->getTypes();
	$kjdTime=$types[$this->type]['data_ftime'];
	$diffTime=strtotime($actionNo['actionTime'])-$this->time-$kjdTime;
	$kjDiffTime=strtotime($lastNo['actionTime'])-$this->time;
?> <!--获取开奖时间、期号等DATA -->

<?php
		 $x115 = array(6,7,15,16);
		 $ssc = array(1,3,5,12,14,26,27);
		 $k3 = array(9,10,25,50,52);
		 $lhc = array(30);
		 $pk = array(20);
		 if(in_array($this->type, $x115)){
				$ttt = 'chart115'; 
		 }else if(in_array($this->type, $ssc)){
				$ttt='chartssc';
		 }else if(in_array($this->type, $k3)){
				$ttt='chartk3';
		 }else if(in_array($this->type, $lhc)){
				$ttt='chartlhc';
		 }else if(in_array($this->type, $pk)){
				$ttt='chartpk';
				}else if(in_array($this->type, $klsf)){
				$ttt='chartklsf';
		 }else{
		        $ttt=' ';
		 }
?>
<style type="text/css">
.gameimg{margin:10px auto auto 8px; position:absolute;}
.gamediv{margin: 0 0 0 132px;  position:absolute; font-size:14px; color:#333;}
</style>
 <div class="todayNumber fl" style="width:1200px">
        <div class="totayNumber-con" id="historyList" style="width:985px;    height: 143px;margin: -31px 0 0 0px;background: #f6f6f6;">
            <!-- 以下是投注区域顶部模块-->
 <div class="bd" id="kaijiang" type="<?=$this->type?>" ctype="<?=$types[$this->type]['type']?>">
      <table width="100%" cellpadding="0" cellspacing="0" border="0" class="game_top_area">
        <tr valign="top">
          <td class="game_top_aleft">
		  <?php if($types[$this->type]['type']==2) { //11选5?>
		  <img src="/images/index/11x5.png" class="gameimg" /> 
		  <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
		   <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
		   
		  <?php }else if($types[$this->type]['type']==6){ //北京赛车?>
		   <img src="/images/index/pk10.png" class="gameimg"/>
		   <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
		    <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
		   <?php }else if($types[$this->type]['type']==4){ //快乐十分?>
		  <img src="/images/index/c9.png" class="gameimg" />
		    <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
			 <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
		  <?php }else if($types[$this->type]['id']==9){ //福彩3D?>
		  <img src="/images/index/3d.png" class="gameimg" />
		    <div class="gamediv" "><span><?=$types[$this->type]['title']?></span>
			 <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
		  <?php }else if($types[$this->type]['id']==10){ //排列三?>
		  <img src="/images/index/p3.png" class="gameimg" />
		    <div class="gamediv" "><span><?=$types[$this->type]['title']?></span>
			 <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
			 <?php }else if($types[$this->type]['id']==30){ //六合?>
		  <img src="/images/index/lhc.png" class="gameimg" />
		    <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
			 <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
			  <?php }else if($types[$this->type]['type']==9){ //k3?>
		  <img src="/images/index/k3.png" class="gameimg" />
		    <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
			 <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span></div>
		  <?php }else{ ?>
		   <img src="/images/index/5.png" class="gameimg"/>
		   <div class="gamediv"><span><?=$types[$this->type]['title']?></span>
		   <span style ="    margin: 5px 5px 3px 153px;">已开盘,距离投注截止还有</span>
		   </div>
		   
		  <?php } ?>
          <ul style="margin-left:110px;">
              <li class="ni kj-title"><p class="i2" style ="margin: 22px 0 0 0;">&nbsp;第<span class="i1"><?=$actionNo['actionNo']?></span> 期 </p></li>
			  <li class="ni kj-title"><p class="i2">&nbsp;总共:<b style="color:#FF0000"><?=$types[$this->type]['num']?></b>&nbsp;期  </p></li>
			 <li class="tb" style="
    margin: -47px 0 0 235px;
"><span class="i2" action="/index.php/display/freshKanJiang/<?=$this->type?>" id="pre-kanjiang">00:00:00</span></li>
	    </ul>
		
	  </td>
       <?php if($types[$this->type]['type']==4) { //快乐十分?>
       <td class="game_top_aright"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></span></b> 期   <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>
         <p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
		 <div class="grid_code_ssc wjkjData" style="margin-top:15px; ">
          	   <p style="display:none"><img src="/images/common/kjts.png" /></p>
			    
              <ul class="kj-hao" ctype="g1" cnum="8" >
                <li id="span_lot_0" class="gr_s gr_s020"> <?=$kjHao[0]?> </li>
                <li id="span_lot_1" class="gr_s gr_s020"> <?=$kjHao[1]?> </li>
                <li id="span_lot_2" class="gr_s gr_s020"> <?=$kjHao[2]?> </li>
                <li id="span_lot_3" class="gr_s gr_s020"> <?=$kjHao[3]?> </li>
                <li id="span_lot_4" class="gr_s gr_s020"> <?=$kjHao[4]?> </li>
                <li id="span_lot_5" class="gr_s gr_s020"> <?=$kjHao[5]?> </li>
                <li id="span_lot_6" class="gr_s gr_s020"> <?=$kjHao[6]?> </li>
                <li id="span_lot_7" class="gr_s gr_s020"> <?=$kjHao[7]?> </li>

              </ul>
              <div class="clear"></div>
          </div>   
	  </td>
     
     <?php }else if($types[$this->type]['type']==6) { //PK10?>
       <td class="game_top_arightt"> <span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></span></b> 期  <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>

<p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
          <div class="grid_code_ssc wjkjData" style="margin-top:15px;">
          	  <p style="display:none"><img src="/images/common/kjts.png" /></p>
			  
              <ul class="kj-hao" ctype="g1" cnum="10">
                <li id="span_lot_0" class="gr_s gr_s0200"> <?=$kjHao[0]?> </li>
                <li id="span_lot_1" class="gr_s gr_s0200"> <?=$kjHao[1]?> </li>
                <li id="span_lot_2" class="gr_s gr_s0200"> <?=$kjHao[2]?> </li>
                <li id="span_lot_3" class="gr_s gr_s0200"> <?=$kjHao[3]?> </li>
                <li id="span_lot_4" class="gr_s gr_s0200"> <?=$kjHao[4]?> </li>
                <li id="span_lot_5" class="gr_s gr_s0200"> <?=$kjHao[5]?> </li>
                <li id="span_lot_6" class="gr_s gr_s0200"> <?=$kjHao[6]?> </li>
                <li id="span_lot_7" class="gr_s gr_s0200"> <?=$kjHao[7]?> </li>
                <li id="span_lot_8" class="gr_s gr_s0200"> <?=$kjHao[8]?> </li>
                <li id="span_lot_9" class="gr_s gr_s0200"> <?=$kjHao[9]?> </li>
              </ul>
              <div class="clear"></div>
          </div>   
	  </td>
    
	  <?php }else if($types[$this->type]['type']==10) { //六合彩?>
       <td class="game_top_arightt"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><?=$lastNo['actionNo']?></span> 期  <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>
          <div class="grid_code_tl wjkjData" >
          	   <p style="display:none"><img src="/images/common/kjts.png" /></p>
			   <p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
              <ul class="kj-hao" ctype="g1" cnum="49" style="margin-left:80px;padding-top:20px;">
                    <li id="span_lot_0" class="gr_s gr_s020"> <?=$kjHao[0]?> </li>
                    <li id="span_lot_1" class="gr_s gr_s020"> <?=$kjHao[1]?> </li>
                    <li id="span_lot_2" class="gr_s gr_s020"> <?=$kjHao[2]?> </li>
                    <li id="span_lot_3" class="gr_s gr_s020"> <?=$kjHao[3]?> </li>
                    <li id="span_lot_4" class="gr_s gr_s020"> <?=$kjHao[4]?> </li>
                    <li id="span_lot_5" class="gr_s gr_s020"> <?=$kjHao[5]?> </li>
					
              </ul>
              <div class="clear"></div>
           </div> 
	  </td>
	 
     <?php }else if($types[$this->type]['type']==9) { //快3?>
      <td class="game_top_aright"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></span></b> 期  <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span> </span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>  
            <p><a href="/index.php/chartk3?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
			
			<div class="grid_code_tl wjkjData" >
              <p class="hide"><img src="/images/common/kjts.png" /></p>
			   
              <ul class="kj-hao k3" ctype="g0"  cnum="6" style="margin-left:70px;">
                    <li id="span_lot_0" class="gr_s gr_s<?=intval($kjHao[0])?>"> </li>
                    <li id="span_lot_1" class="gr_s gr_s<?=intval($kjHao[1])?>"> </li>
                    <li id="span_lot_2" class="gr_s gr_s<?=intval($kjHao[2])?>"> </li>
              </ul>
              <div class="clear"></div>
           </div>
       </td> 
	   
     
     <?php }else if($types[$this->type]['type']==3) { //3D?>
      <td class="game_top_aright"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></span></b> 期  <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="声音开启，点击关闭" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>

<p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>		
            <div class="grid_code_tl wjkjData" >
              	 <p style="display:none"><img src="/images/common/kjts.png" /></p>
				  
              	<ul class="kj-hao" ctype="g0"  cnum="6" style="margin-left:100px;">
                    <li id="span_lot_0" class="gr_s gr_s<?=intval($kjHao[0])?>"> </li>
                    <li id="span_lot_1" class="gr_s gr_s<?=intval($kjHao[1])?>"> </li>
                    <li id="span_lot_2" class="gr_s gr_s<?=intval($kjHao[2])?>"> </li>
                  </ul>
              <div class="clear"></div>
           </div>
       </td> 
      
      <?php }else if($types[$this->type]['type']==2) { //11选5?>
       
         <td class="game_top_aright"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></b></span> 期   <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>  
              <p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
			  <div class="grid_code_ssc wjkjData" >
              	 <p style="display:none"><img src="/images/common/kjts.png" /></p>
				 
                  <ul class="kj-hao" ctype="g3" cnum="6" >
                    <li id="span_lot_0" class="gr_s gr_s<?=$kjHao[0]?>"></li>
                    <li id="span_lot_1" class="gr_s gr_s<?=$kjHao[1]?>"></li>
                    <li id="span_lot_2" class="gr_s gr_s<?=$kjHao[2]?>"></li>
                    <li id="span_lot_3" class="gr_s gr_s<?=$kjHao[3]?>"></li>
                    <li id="span_lot_4" class="gr_s gr_s<?=$kjHao[4]?>"></li>
                  </ul>
                  <div class="clear"></div>
            </div>   
             
	  </td>
	 
      
 	<?php }else{  ?>
       
         <td class="game_top_aright"> 
	    <div class="kj-bottom"><span class="tit">&nbsp;&nbsp;第 <span class="last_issues"><b><?=$lastNo['actionNo']?></b></span> 期  <span id="kjsay">开奖倒计时：<em class="kjtips">00:00</em></span></span><img id="voice" class="voice-on"  title="" onclick="voiceKJ()"><span id="lockgame"></span><div class="clear"></div></div>  
             <p><a href="/index.php/<?=$ttt ?>?type=<?=$this->type ?>&count=30" class="haomazoushi" target="_blank">号码走势</a></p>
			 <div class="grid_code_ssc wjkjData" >
              	  <p style="display:none"><img src="/images/common/kjts.png" /></p>
				   
                  <ul class="kj-hao" ctype="g0"  cnum="10">
                    <li id="span_lot_0" class="gr_s gr_s<?=intval($kjHao[0])?>"> </li>
                    <li id="span_lot_1" class="gr_s gr_s<?=intval($kjHao[1])?>"> </li>
                    <li id="span_lot_2" class="gr_s gr_s<?=intval($kjHao[2])?>"> </li>
                    <li id="span_lot_3" class="gr_s gr_s<?=intval($kjHao[3])?>"> </li>
                    <li id="span_lot_4" class="gr_s gr_s<?=intval($kjHao[4])?>"> </li>
                  </ul>
                  <div class="clear"></div>
            </div>   
             
	  </td>
	  <!--<td class="game_top_period" width='250' >
	    <div style='padding:3px 5px' id='historylot'>
        <?php  $this->display('index/inc_data_history.php'); ?>
        </div>
	  </td>-->
       <?php }?>
        </tr>
      </table>
    </div> 
	<!-- ID kaijiang END  -->
		</div>
    </div>
	
    <div class="clear"></div>
<script type="text/javascript">
$(function(){
	window.S=<?=json_encode($diffTime>0)?>;
	window.KS=<?=json_encode($kjDiffTime>0)?>;
	window.kjTime=parseInt(<?=json_encode($kjdTime)?>);
	
	if($.browser.msie){
		window.diffTime=<?=$diffTime?>;
		setTimeout(function(){
			gameKanJiangDataC(<?=$diffTime?>);
		}, 1000);
	}else{
		setTimeout(gameKanJiangDataC, 1000, <?=$diffTime?>);
	}
	<?php if($kjDiffTime>0){ ?> 
		if($.browser.msie){
		setTimeout(function(){
			setKJWaiting(<?=$kjDiffTime?>);
		}, 1000);
		}else{
			setTimeout(setKJWaiting, 1000, <?=$kjDiffTime?>);
		}
	<?php } ?> 
	
	<?php if(!$kjHao){ ?> 
		loadKjData();
	<?php } ?> 
});
</script>